<?php
declare (strict_types = 1);

namespace app\model;

use think\Model;

class User extends Model
{
    // 设置表名
    protected $name = 'users';
    // 定义自动时间戳字段
    protected $autoWriteTimestamp = true;
    protected $createTime = 'created_at';
    protected $updateTime = false;

    // 设置获取器示例 (例如处理头像URL)
    public function getAvatarAttr($value)
    {
        return $value ? url($value) : null;
    }
}
